@layout("/common/_container.html"){
<style>
    .div_header {
        background: #f5f5f5;
        border-bottom: 1px solid #dddddd;
        color: #333;
        padding: 10px 15px;
    }

    .btnBox {
        background: #f5f5f5;
        border-top: 1px solid #dddddd;
        padding: 10px 15px;
        position: fixed;
        width: 100%;
        bottom: 0;
        left: 0;
        text-align: right;
        height: 60px;
    }

    .btnBox button {
        margin: 0;
        color: white;
        background: #2eadd0;
        width: 90px;
        border: 1px solid #dddddd;
    }
</style>
<div class="ibox-content" style="height: 100%;padding-bottom: 60px;">
    <div style="display: none">
        <input type="hidden" id="customerId" value="${customerId}">
        <input type="hidden" id="customerName" value="${customerInfo.customerName}">
    </div>
    <div style="display: flex;height: 100%">
        <div style="flex: 1;margin-right: 15px;">
            <div style="border-radius: 5px;border: 1px solid #dddddd;height: 80%">
                <div class="div_header">消息模版</div>
            </div>
        </div>
        <div style="flex: 3;display: flex;flex-direction: column;border-radius: 5px;">
            <div style="flex: 1;border-radius: 5px;border: 1px solid #dddddd;margin-bottom: 15px;">
                <div class="div_header">患者信息</div>
                <div>
                    门诊：${customerInfo.outpatientName}&nbsp
                    病历号：${customerInfo.medicalRecordNumber}&nbsp
                    姓名：${customerInfo.customerName}&nbsp
                    性别：${customerInfo.sex}&nbsp
                    年龄：${customerInfo.customerAge}&nbsp
                    现场TC：${customerInfo.fieldTc}
                </div>
            </div>
            <div style="flex: 1;border-radius: 5px;border: 1px solid #dddddd">
                <div class="div_header">消息</div>
                <div style="display: flex;padding: 20px 0;">
                    <div style="flex: 1;text-align: center">
                        <div style="margin-bottom: 30px;">消息渠道</div>
                        <div style="margin-bottom: 30px;">手机号码</div>
                        <div style="margin-bottom: 30px;">消息内容</div>
                    </div>
                    <div style="flex: 4;">
                        <div style="margin-bottom: 30px;">
                            <input type="radio" name="message" checked="checked"/><span>短信</span>
                        </div>
                        <div style="margin-bottom: 30px;">
                            <input type="text" id="customerPhone" disabled="disabled" value="${customerInfo.customerPhone}">
                            <input type="checkbox" id="sqi" onclick="checkboxOnclick(this)"/><label
                                for="sqi">使用其他手机号</label>
                        </div>
                        <div style="margin-bottom: 30px;">
                            <textarea name="message_content" id="message_content"
                                      style="width: 97%;height: 120px;"></textarea>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="btnBox">
        <button class="btn" type="button" style="background: white;color: #333333"
                onclick="Customer.close()">取消
        </button>
        <button class="btn" type="button" onclick="Customer.msgSend()">发送</button>
    </div>
</div>
<script src="${ctxPath}/static/modular/arrival/customer/customer.js"></script>
<script>
    function checkboxOnclick(checkbox) {
        if (checkbox.checked == true) {
            document.getElementById("customerPhone").value = "";
            $("#customerPhone").attr("disabled",false);
        } else {
            document.getElementById("customerPhone").value = "${customerInfo.customerPhone}";
            $("#customerPhone").attr("disabled",true);
        }
    }
</script>
@}